﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>材料管理</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/plugins/chosen/chosen.css" rel="stylesheet">

    <!-- Sweet Alert -->
    <link href="css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <!-- jsTree -->
    <link href="css/plugins/jsTree/style.min.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">
    <link href="css/add-style.css" rel="stylesheet">
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div id="part1" class="col-sm-3">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>材料分类</h5>
                    </div>
                    <div class="ibox-content">
                        <p>
                            <a data-toggle="modal" class="btn btn-outline btn-success btn-sm" href="project_plan.html#modal-form-same">添加同级</a>
                            <a data-toggle="modal" class="btn btn-outline btn-info btn-sm" href="project_plan.html#modal-form-son">添加子级</a>
                            <a class="btn btn-outline btn-warning btn-sm" href="javascript:void(0)" onclick="demo_rename();">修改选中</a>
                            <a data-toggle="modal" class="btn btn-outline btn-danger btn-sm  demo4 " href="project_plan.html#modal-form">删除选中</a>
                        </p>
                        <div class="input-group input-group-sm">
                            <input type="text" placeholder="查找分类" class="input form-control">
                            <span class="input-group-btn">
                                <button type="button" class="btn btn-success"><i class="fa fa-search"></i>&nbsp;搜索</button>
                            </span>
                        </div>
                        <div id="jstree3" style="margin: 10px 0 0 -10px;">
                            <ul>
                                <li>办公用品
                                   
                                    <ul>
                                        <li data-jstree='{"type":"icon"}'>材料工具
                                              <ul>
                                                  <li data-jstree='{"type":"son"}'>美工刀</li>
                                                  <li data-jstree='{"type":"son"}'>剪子</li>
                                                  <li data-jstree='{"type":"son"}'>螺丝</li>
                                              </ul>
                                        </li>
                                        <li data-jstree='{"type":"icon"}'>工具栏
                                        <ul>
                                            <li data-jstree='{"type":"son"}'>办公用品</li>
                                            <li data-jstree='{"type":"son"}'>安保用品</li>
                                            <li data-jstree='{"type":"son"}'>文具</li>
                                        </ul>
                                        </li>
                                        <li data-jstree='{"type":"icon"}'>消耗品
                                            <ul>
                                                <li data-jstree='{"type":"son"}'>办公用品</li>
                                                <li data-jstree='{"type":"son"}'>安保用品</li>
                                                <li data-jstree='{"type":"son"}'>文具</li>
                                            </ul>
                                        </li>

                                    </ul>
                                </li>
                                <li>保洁用品
                                   
                                    <ul>
                                        <li data-jstree='{"type":"icon"}'>双子座仓库
                                            <ul>
                                                <li data-jstree='{"type":"son"}'>办公用品</li>
                                                <li data-jstree='{"type":"son"}'>安保用品</li>
                                                <li data-jstree='{"type":"son"}'>文具</li>
                                            </ul>
                                        </li>
                                        <li data-jstree='{"type":"icon"}'>富力中心仓库
                                            <ul>
                                                <li data-jstree='{"type":"son"}'>办公用品</li>
                                                <li data-jstree='{"type":"son"}'>安保用品</li>
                                                <li data-jstree='{"type":"son"}'>文具</li>
                                            </ul>
                                        </li>
                                        <li data-jstree='{"type":"icon"}'>天鹅湾仓库
                                            <ul>
                                                <li data-jstree='{"type":"son"}'>办公用品</li>
                                                <li data-jstree='{"type":"son"}'>安保用品</li>
                                                <li data-jstree='{"type":"son"}'>文具</li>
                                            </ul>
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-9">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>材料信息</h5>
                         <div class="pull-right" style="margin:-7px 7px 0 0">
                                <a data-toggle="modal" href="storage_goods.html#modal-form" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i>&nbsp;增加 </a>
                                <div class="btn-group filt_box" style="margin-top: -3px;">
                                    <button type="button" class="btn btn-sm btn-info"><i class="fa fa-random"></i>&nbsp;导入</button>
                                    <input type="file" class="upload-pic" name="picture">
                                </div>
                            </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row m-b-sm">
                           <div class="col-md-10 col-md-offset-2">
                                
                               <select data-placeholder="选择查询条件" class="form-control input-sm m-b chosen-select" tabindex="2" style="width:150px;">
                                    <option value="100000" hassubinfo="true" selected="selected">按材料编号查询</option>
                                    <option value="110000" hassubinfo="true">按材料名称查询</option>
                                    <option value="120000" hassubinfo="true">按材料品牌查询</option>
                                </select>
                            
                                <div class="input-group">
                                    <input type="text" placeholder="请输入材料编号\名称\品牌规格（支持模糊查询）" class="input-sm form-control">
                                    <span class="input-group-btn">
                                        <button type="button" class="btn btn-sm btn-success"><i class="fa fa-search"></i>&nbsp;搜索</button>
                                    </span>
                                </div>
                            </div>
                           
                        </div>
                        <table class="table table-striped table-hover">
                            <tr>
                                <th>序号</th>
                                <th>材料编号</th>
                                <th>类别</th>
                                <th>名称</th>
                                <th>单位</th>
                                <th>品牌规格</th>
                                <th>库存</th>
                                <th>参考价格</th>
                                <th>操作</th>
                            </tr>
                            <tr>
                                <td>1</td>
                                <td>8001</td>
                                <td>
                                    <a data-toggle="tab" href="#contact-1" class="client-link">办公用品</a>
                                </td>
                                <td>电话机</td>
                                <td>部</td>
                                <td>西门子800</td>
                                <td class="client-status">
                                    <span class="label label-primary">3</span>
                                </td>
                                <td>7954.87
                                </td>
                                <td>
                                    <a data-toggle="modal" href="storage_goods.html#modal-edit" class="text-warning">修改</a>&nbsp;&nbsp;
                                    <a href="javascript:;"  class="text-danger demo4">删除</a>
                                </td>
                            </tr>
                            <tr>
                                <td>2</td>
                                <td>8002</td>
                                <td>
                                    <a data-toggle="tab" href="#contact-1" class="client-link">办公用品</a>
                                </td>
                                <td>电话机</td>
                                <td>部</td>
                                <td>西门子800</td>
                                <td class="client-status">
                                    <span class="label label-primary">3</span>
                                </td>
                                <td>7954.87
                                </td>
                                <td>
                                    <a data-toggle="modal" href="storage_goods.html#modal-edit" class="text-warning">修改</a>&nbsp;&nbsp;
                                    <a href="javascript:;"  class="text-danger demo4">删除</a>
                                </td>
                            </tr>
                            <tr>
                                <td>3</td>
                                <td>8003</td>
                                <td>
                                    <a data-toggle="tab" href="#contact-1" class="client-link">办公用品</a>
                                </td>
                                <td>电话机</td>
                                <td>部</td>
                                <td>西门子800</td>
                                <td class="client-status">
                                    <span class="label label-primary">3</span>
                                </td>
                                <td>7954.87
                                </td>
                                <td>
                                    <a data-toggle="modal" href="storage_goods.html#modal-edit" class="text-warning">修改</a>&nbsp;&nbsp;
                                    <a href="javascript:;"  class="text-danger demo4">删除</a>
                                </td>
                            </tr>
                            <tfoot>
                            <tr>
                                <th colspan="6">合计</th>
                                <th>9</th>
                                <th colspan="2">7954.87</th>
                            </tr>
                           </tfoot>
                        </table>
                        <div class="text-right">
                            <ul class="pagination">
                                <li><a href="#">&laquo;</a></li>
                                <li><a href="#">1</a></li>
                                <li><a href="#">2</a></li>
                                <li><a href="#">3</a></li>
                                <li><a href="#">4</a></li>
                                <li><a href="#">5</a></li>
                                <li><a href="#">&raquo;</a></li>
                                <li><a href="#">页数：1/10</a></li>
                                <li><a href="#">总记录数：1000</a></li>
                            </ul>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <div class="modal fade" id="modal-form" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h5 class="modal-title">新增材料</h5>
                </div>
                <div class="modal-body">
                    <div class="row">
                                <div class="col-sm-8">
                                    <h5>材料信息</h5>
                                    <table>
                                        <tbody>
                                            <tr>
                                                <th>所属类别：</th>
                                                <td>
                                                    <input type="text" value="" class="form-control input-sm"></td>
                                                <th>材料编号：</th>
                                                <td>
                                                    <input type="text" value="" class="form-control input-sm"></td>
                                            </tr>

                                            <tr>
                                                <th>材料名称：</th>
                                                <td>
                                                    <input type="text" value="" class="form-control input-sm"></td>
                                                <th>材料单位：</th>
                                                <td>
                                                    <input type="text" value="" class="form-control input-sm"></td>
                                            </tr>
                                            <tr>
                                                <th>规格型号：</th>
                                                <td>
                                                    <input type="text" value="" class="form-control input-sm"></td>
                                                <th>材料颜色：</th>
                                                <td>
                                                    <input type="text" value="" class="form-control input-sm"></td>
                                            </tr>
                                            <tr>
                                                <th>进货价格：</th>
                                                <td>
                                                    <input type="text" value="" class="form-control input-sm"></td>
                                                <th>出货价格：</th>
                                                <td>
                                                    <input type="text" value="" class="form-control input-sm"></td>
                                            </tr>
                                            <tr>
                                                <th>库存下限：</th>
                                                <td>
                                                    <input type="text" value="" class="form-control input-sm"></td>
                                                <th>期初库存：</th>
                                                <td>
                                                    <input type="text" value="" class="form-control input-sm"></td>
                                            </tr>
                                            <tr>
                                                <th>生产厂商：</th>
                                                <td colspan="3">
                                                    <input type="text" value="" class="form-control input-sm"></td>
                                            </tr>

                                            <tr>

                                                <th>备注：</th>
                                                <td colspan="3">
                                                    <input type="text" value="" class="form-control input-sm"></td>

                                            </tr>

                                        </tbody>
                                    </table>
                                </div>
                                <div class="col-sm-4">
                                    <h5 style="margin-bottom: 18px;">已存材料</h5>
                                    <table class="table table-bordered" style="margin-bottom: 18px;">
                                        <tbody>
                                            <tr style="background: #f5f5f5;">
                                                <td class="client-link">材料编号</td>
                                                <td class="client-link">材料名称</td>
                                            </tr>
                                            <tr>
                                                <td>Dqw3</td>
                                                <td>电脑显示器</td>
                                            </tr>
                                            <tr>
                                                <td>Dell24</td>
                                                <td>无线鼠标</td>
                                            </tr>
                                            <tr>
                                                <td colspan="3">
                                                    <p class="text-danger">此列表显示的是已经保存过的材料，如果要退出请直接点退出按钮</p>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>


                            </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary demo2">保存</button>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="modal-edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h5 class="modal-title">修改材料信息</h5>
                </div>
                <div class="modal-body">
                    <div class="row">
                                <div class="col-sm-12">
                                    <table style="width:100%;">
                                        <tbody>
                                            <tr>
                                                <th>所属类别：</th>
                                                <td>
                                                    <input type="text" value="办公用品" class="form-control input-sm"></td>
                                                <th>材料编号：</th>
                                                <td>
                                                    <input type="text" value="D2314" class="form-control input-sm"></td>
                                            </tr>

                                            <tr>
                                                <th>材料名称：</th>
                                                <td>
                                                    <input type="text" value="电脑显示器" class="form-control input-sm"></td>
                                                <th>材料单位：</th>
                                                <td>
                                                    <input type="text" value="台" class="form-control input-sm"></td>
                                            </tr>
                                            <tr>
                                                <th>规格型号：</th>
                                                <td>
                                                    <input type="text" value="037682" class="form-control input-sm"></td>
                                                <th>材料颜色：</th>
                                                <td>
                                                    <input type="text" value="黑色" class="form-control input-sm"></td>
                                            </tr>
                                            <tr>
                                                <th>进货价格：</th>
                                                <td>
                                                    <input type="text" value="1056" class="form-control input-sm"></td>
                                                <th>出货价格：</th>
                                                <td>
                                                    <input type="text" value="1025" class="form-control input-sm"></td>
                                            </tr>
                                            <tr>
                                                <th>库存下限：</th>
                                                <td>
                                                    <input type="text" value="3" class="form-control input-sm"></td>
                                                <th>期初库存：</th>
                                                <td>
                                                    <input type="text" value="2" class="form-control input-sm"></td>
                                            </tr>
                                            <tr>
                                                <th>生产厂商：</th>
                                                <td colspan="3">
                                                    <input type="text" value="惠普" class="form-control input-sm"></td>
                                            </tr>

                                            <tr>

                                                <th>备注：</th>
                                                <td colspan="3">
                                                    <input type="text" value="" class="form-control input-sm"></td>

                                            </tr>

                                        </tbody>
                                    </table>
                                </div>
                            </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary demo2">保存</button>
                </div>
            </div>
        </div>
    </div>
    







    <!-- 全局js -->
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
    <script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

    <!-- 自定义js -->
    <script src="js/content.js?v=1.0.0"></script>
    <script src="js/common.js"></script>


    <!-- jsTree plugin javascript -->
    <script src="js/plugins/jsTree/jstree.min.js"></script>

    <style>
        .jstree-open > .jstree-anchor > .fa-folder:before {
            content: "\f07c";
        }

        .jstree-default .jstree-icon.none {
            width: 0;
        }
    </style>
    <!--控制页面树元素-->
    <script>
        $(document).ready(function () {
            function demo_rename() {
                var ref = $('#jstree3').jstree(true),
                    sel = ref.get_selected();
                if (!sel.length) { return false; }
                sel = sel[0];
                ref.edit(sel);
            };
            $('#jstree3').jstree({
                'core': {
                    'check_callback': true
                },
                'plugins': ['types', 'dnd'],
                'types': {
                    'default': {
                        'icon': 'fa fa-folder'
                    },
                    'html': {
                        'icon': 'fa fa-file-code-o'
                    },
                    'svg': {
                        'icon': 'fa fa-file-picture-o'
                    },
                    'css': {
                        'icon': 'fa fa-file-code-o'
                    },
                    'img': {
                        'icon': 'fa fa-file-image-o'
                    },
                    'son': {
                        'icon': 'fa fa-file-text-o'
                    }

                }
            });
        });

    </script>
    <script>
        $(function () {
            $('.full-height-scroll').slimScroll({
                height: '100%'
            });
        });
    </script>
      <!-- Chosen -->
    <script src="js/plugins/chosen/chosen.jquery.js"></script>
    <script>
        var config = {
            ".chosen-select": {},
            ".chosen-select-deselect": {
                allow_single_deselect: true
            },
            ".chosen-select-no-single": {
                disable_search_threshold: 10
            },
            ".chosen-select-no-results": {
                no_results_text: "Oops, nothing found!"
            },
            ".chosen-select-width": {
                width: "95%"
            }
        };
        for (var selector in config) {
            $(selector).chosen(config[selector])
        }

    </script>
    <script>
        /**
* 使页面中所有.modal元素在窗口可视范围之内居中
**/
        function centerModals() {
            $('.modal').each(function (i) {
                var $clone = $(this).clone().css('display', 'block').appendTo('body');
                var top = Math.round(($clone.height() - $clone.find('.modal-content').height()) / 2);
                top = top > 50 ? top : 0;
                $clone.remove();
                $(this).find('.modal-content').css("margin-top", top - 50);
            });
        }
        // 在模态框出现的时候调用垂直居中函数
        $('.modal').on('show.bs.modal', centerModals);
        // 在窗口大小改变的时候调用垂直居中函数
        $(window).on('resize', centerModals);
    </script>

     <!-- Sweet alert -->
    <script src="js/plugins/sweetalert/sweetalert.min.js"></script>
    <script>
        //-- 保存小弹框--
        $('.demo2').click(function () {
            swal({
                title: "保存成功！",
                type: "success"
            });
        });
        //-- 删除弹框--
        $('.demo4').click(function () {
            swal({
                title: "您确定要删除这条信息吗",
                text: "删除后将无法恢复，请谨慎操作！",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "删除",
                closeOnConfirm: false
            }, function () {
                swal("删除成功！", "您已经永久删除了这条信息。", "success");
            });
        });
    </script>
</body>
</html>
